package com.velpro.im.service.impl;

import com.velpro.im.mapper.ExampleMapper;
import com.velpro.im.mapper.IBaseMapper;
import com.velpro.im.mapper.UserMapper;
import com.velpro.im.mapper.po.Example;
import com.velpro.im.mapper.po.User;
import com.velpro.im.service.ExampleService;
import com.velpro.im.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
@Transactional(rollbackFor = {RuntimeException.class,Exception.class})
public class ExampleServiceImpl extends BaseServiceImpl<Example> implements ExampleService {

	@Autowired
    private ExampleMapper exampleMapper;

	@Override
	protected IBaseMapper<Example> getMapper() {
		return exampleMapper;
	}


	@Override
	public void insert(Example example) {
		this.exampleMapper.insert(example);
	}

	@Override
	public void updateInfo(Example example) {
		this.exampleMapper.updateByPrimaryKeySelective(example);
	}

	@Override
	public void delete(Integer id) {
		this.exampleMapper.deleteByIds(id.toString());
	}
}
